#include "include/GameInit.h"

int main()
{
    GameInit InitGame;

    int     frame = 0;
    bool    running = true;
    double Entf = -19.0f;
    double ho = -1.0f;
    double re = 0.0f;




    while(running)
    {
        glColor3f(0.3f,0.1f,1.0f);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        glBegin(GL_QUADS);				// Draw A Quad
        glVertex3f(ho, 1.0f, re);		// Top Left
        glVertex3f( 1.0f, 1.0f, 0.0f);		// Top Right
        glVertex3f( 1.0f,-1.0f, 0.0f);		// Bottom Right
        glVertex3f(ho,-1.0f, re);		// Bottom Left
        glEnd();
/////////////////////////////////////////////////////////////TEST PRO

        if(glfwGetKey( GLFW_KEY_DOWN )) ho=ho-0.1; //
        if(glfwGetKey( GLFW_KEY_UP )) ho=ho+0.1;
        if(glfwGetKey( GLFW_KEY_LEFT)) re=re-0.1;
        if(glfwGetKey( GLFW_KEY_RIGHT )) re=re+0.1;

///////////////////////////////////////////////////////////////TEST PRO

        glfwSleep(0.01);

     //   std::cout << ho << std::endl;
        running = !glfwGetKey( GLFW_KEY_ESC ) &&
          glfwGetWindowParam( GLFW_OPENED );

        glfwSwapBuffers();
    }
     std::cout << InitGame.g_WindowWidth << " " << InitGame.g_WindowHeight << std::endl;

    glfwTerminate();

    return 0;
}

